#-*- coding: utf-8 -*-

from menu import CMenu as CCustomMenu
from cocos.scenes import FadeTRTransition
from object import *
from player import CPlayer

class CMenu(CCustomMenu):
	m_Name	=""
	m_SID	= 1
	m_Items	= {
		1	:{"text":"开始游戏",},
		2	:{"text":"读取档案","items":{
				21: {"text":"哪有存档"},
				22: {"text":"返回吧","return":1},
			}},
		3	:{"text":"游戏结束",},
	}

	def Click(self,i):
		print "item",i
		if i==1:
			from cocos.director import director
			scobj=CreateScene(2)
			pobj=CPlayer()
			pobj.x=400
			pobj.y=500
			scobj.EnterScene(pobj)
			director.replace(FadeTRTransition(scobj,duration=1))
		if i==3:
			pass
		if i==21:
			pass
		if i==22:
			pass
